Crate nostr_types

source ·
Expand description

This crate provides types for nostr protocol handling.

Structs

  • Conditions of delegation
  • This is an encrypted private key.
  • The main event type
  • An event id along with some relays in which that event may be found.
  • Filter which specify what events a client is looking for
  • An event identifier, constructed as a SHA256 hash of the event fields according to NIP-01
  • An event identifier, constructed as a SHA256 hash of the event fields according to NIP-01, as a hex string
  • An event identifier prefix, constructed as a SHA256 hash of the event fields according to NIP-01, as a hex string
  • Metadata about a user
  • The content of a webserver’s /.well-known/nostr.json file used in NIP-05 and NIP-35 This allows lookup and verification of a nostr user via a user@domain style identifier.
  • This is a response from a zapper lnurl
  • Data used to construct an event
  • This is a private key which is to be kept secret and is used to prove identity
  • A person’s profile on nostr which consists of the data needed in order to follow someone.
  • This is a public key, which identifies an actor (usually a person) and is shared.
  • This is a public key, which identifies an actor (usually a person) and is shared, as a hex string
  • This is a public key prefix, which identifies an actor (usually a person) and is shared, as a hex string
  • Relay information document as described in NIP-11, supplied by a relay
  • Relay limitations
  • A Url validated as a nostr relay url in canonical form We don’t serialize/deserialize these directly, see UncheckedUrl for that
  • A Schnorr signature that signs an Event, taken on the Event Id field
  • A Schnorr signature that signs an Event, taken on the Event Id field, as a hex string
  • A list of relays with SimpleRelayUsage
  • When and how to use a Relay
  • A random client-chosen string used to refer to a subscription
  • A string that is supposed to represent a URL but which might be invalid
  • An integer count of the number of seconds from 1st January 1970. This does not count any of the leap seconds that have occurred, it simply presumes UTC never had leap seconds; yet it is well known and well understood.
  • A String representing a valid URL with an authority present including an Internet based host.

Enums

  • A message from a client to a relay
  • Errors that can occur in the nostr-proto crate
  • Delegation information for an Event
  • A kind of Event
  • This indicates the security of the key by keeping track of whether the secret key material was handled carefully. If the secret is exposed in any way, or leaked and the memory not zeroed, the key security drops to Weak.
  • A message from a relay to a client
  • A tag on an Event